<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="libs/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="libs/layui/css/layui.css">
  <link rel="stylesheet" href="css/base.css">
  <link rel="stylesheet" href="css/settings.css">
  <title>设置</title>
</head>
<body>
<!--头部导航-->
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="collapse navbar-collapse" id="mynav">
      <div class="navbar-header">
        <a href="/">
          <img src="imgs/logo.png" alt="jyt">
        </a>
      </div>
      <ul class="nav navbar-nav">
        <li><a href="index.html">实时</a></li>
        <li><a href="dataforms.html">报表</a></li>
        <li><a href="chartforms.html">图表</a></li>
        <li><a href="integrate.html">综合</a></li>
        <li><a href="settings.html">设置</a></li>
      </ul>
    </div>
  </div>
</nav>

<!--参数设置-->
<section class="setOption">
  <fieldset>
    <legend>参数设置</legend>
    <div class="options clearfix" id="params">
      <div><span>生产日期</span><input id="datetime" type="text" placeholder="请选择"></div>
      <div><span>通讯号码</span><input id="meternum" type="text" placeholder="请输入"></div>
      <div><span>水表名称</span><input id="metername" type="text" placeholder="请输入"></div>
      <div><span>白班总量</span><input id="dayshift" type="number" step=".1" min="0" placeholder="请输入">(T)</div>
      <div><span>夜班总量</span><input id="nightshift" type="number" step=".1" min="0" placeholder="请输入">(T)</div>
      <div><span>当日总量</span><input id="daytotal" type="number" step=".1" min="0" placeholder="请输入">(T)</div>
      <div><span>当月总量</span><input id="monthtotal" type="number" step=".1" min="0" placeholder="请输入">(T)</div>
      <div><span>最大流量</span><input id="maxflow" type="number" step=".1" min="0" placeholder="请输入">(m³/h)</div>
      <div><button class="btn btn-primary addBtn">添加</button></div>
    </div>
  </fieldset>
</section>

<!--设备列表-->
<section class="device-list">
  <div class="devicewrap">
    <table id="devices" lay-filter="watermeter"></table>
  </div>
</section>

<!-- Modal/行编辑 -->
<div class="modal fade" id="rowModal" tabindex="-1" role="dialog" aria-labelledby="rowModalLabel" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="rowModalLabel">编辑参数</h4>
      </div>
      <div class="modal-body">
        <form method="get" action="#" id="editRow">
          <div><span>生产日期</span><input name="datetime" id="datetime-row" type="text" value=""></div>
          <div><span>通讯号码</span><input name="meternum" type="text"></div>
          <div><span>水表名称</span><input name="metername" type="text"></div>
          <div><span>白班总量</span><input name="dayshift" type="number" step=".1" min="0" value="">(T)</div>
          <div><span>夜班总量</span><input name="nightshift" type="number" step=".1" min="0" value="">(T)</div>
          <div><span>当日总量</span><input name="daytotal" type="number" step=".1" min="0" value="">(T)</div>
          <div><span>当月总量</span><input name="monthtotal" type="number" step=".1" min="0" value="">(T)</div>
          <div><span>最大流量</span><input name="maxflow" type="number" step=".1" min="0" value="">(m³/h)</div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" id="saveRow">保存</button>
      </div>
    </div>
  </div>
</div>

<!--Modal/批量编辑-->
<div class="modal fade" id="batchModal" tabindex="-1" role="dialog" aria-labelledby="batchModalLabel" data-backdrop="static">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="batchModalLabel">批量编辑</h4>
      </div>
      <div class="modal-body">
        <form method="get" action="#" id="editBatch">
          <div><span>白班总量</span><input name="dayshift" type="number" step=".1" min="0" value="">(T)</div>
          <div><span>夜班总量</span><input name="nightshift" type="number" step=".1" min="0" value="">(T)</div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" id="saveBatch">保存</button>
      </div>
    </div>
  </div>
</div>


<!--表格工具栏-->
<script type="text/html" id="toolbarDemo">
  <div class="layui-btn-container">
    <button class="layui-btn layui-btn-sm editBatch" lay-event="editBatchData" data-toggle="modal" data-target="#batchModal">批量编辑</button>
    <button class="layui-btn layui-btn-sm deleteBatch" lay-event="deleteBatchData">批量删除</button>
  </div>
</script>
<!--行操作-->
<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="edit" data-toggle="modal" data-target="#rowModal">编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script src="libs/jquery.min.js"></script>
<script src="libs/bootstrap/js/bootstrap.min.js"></script>
<script src="libs/layui/layui.js"></script>
<script src="js/tool.js"></script>
<script src="js/settings.js"></script>
</body>
</html>